INLINE int BLENDER1_16_IMR_ZC_DITH_NAC_FORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_IMR_ZC_NDITH_NAC_FORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_IMR_NZC_DITH_NAC_FORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_IMR_NZC_NDITH_NAC_FORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_NIMR_ZC_DITH_NAC_FORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_NIMR_ZC_NDITH_NAC_FORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_NIMR_NZC_DITH_NAC_FORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_NIMR_NZC_NDITH_NAC_FORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);

INLINE int BLENDER2_16_IMR_ZC_DITH_NAC_FORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_IMR_ZC_NDITH_NAC_FORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_IMR_NZC_DITH_NAC_FORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_IMR_NZC_NDITH_NAC_FORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_NIMR_ZC_DITH_NAC_FORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_NIMR_ZC_NDITH_NAC_FORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_NIMR_NZC_DITH_NAC_FORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_NIMR_NZC_NDITH_NAC_FORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);

INLINE int BLENDER1_16_IMR_ZC_DITH_AC_FORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_IMR_ZC_NDITH_AC_FORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_IMR_NZC_DITH_AC_FORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_IMR_NZC_NDITH_AC_FORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_NIMR_ZC_DITH_AC_FORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_NIMR_ZC_NDITH_AC_FORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_NIMR_NZC_DITH_AC_FORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_NIMR_NZC_NDITH_AC_FORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);

INLINE int BLENDER2_16_IMR_ZC_DITH_AC_FORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_IMR_ZC_NDITH_AC_FORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_IMR_NZC_DITH_AC_FORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_IMR_NZC_NDITH_AC_FORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_NIMR_ZC_DITH_AC_FORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_NIMR_ZC_NDITH_AC_FORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_NIMR_NZC_DITH_AC_FORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_NIMR_NZC_NDITH_AC_FORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);

INLINE int BLENDER1_16_IMR_ZC_NAC_ND_FORCE(UINT16 *fb, UINT8* hb, COLOR c);
INLINE int BLENDER1_16_IMR_NZC_NAC_ND_FORCE(UINT16 *fb, UINT8* hb, COLOR c);
INLINE int BLENDER1_16_NIMR_ZC_NAC_ND_FORCE(UINT16 *fb, UINT8* hb, COLOR c);
INLINE int BLENDER1_16_NIMR_NZC_NAC_ND_FORCE(UINT16 *fb, UINT8* hb, COLOR c);

INLINE int BLENDER2_16_IMR_ZC_NAC_ND_FORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2);
INLINE int BLENDER2_16_IMR_NZC_NAC_ND_FORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2);
INLINE int BLENDER2_16_NIMR_ZC_NAC_ND_FORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2);
INLINE int BLENDER2_16_NIMR_NZC_NAC_ND_FORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2);

INLINE int BLENDER1_16_IMR_ZC_AC_ND_FORCE(UINT16 *fb, UINT8* hb, COLOR c);
INLINE int BLENDER1_16_IMR_NZC_AC_ND_FORCE(UINT16 *fb, UINT8* hb, COLOR c);
INLINE int BLENDER1_16_NIMR_ZC_AC_ND_FORCE(UINT16 *fb, UINT8* hb, COLOR c);
INLINE int BLENDER1_16_NIMR_NZC_AC_ND_FORCE(UINT16 *fb, UINT8* hb, COLOR c);

INLINE int BLENDER2_16_IMR_ZC_AC_ND_FORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2);
INLINE int BLENDER2_16_IMR_NZC_AC_ND_FORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2);
INLINE int BLENDER2_16_NIMR_ZC_AC_ND_FORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2);
INLINE int BLENDER2_16_NIMR_NZC_AC_ND_FORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2);

INLINE int BLENDER1_16_IMR_ZC_DITH_NAC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_IMR_ZC_NDITH_NAC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_IMR_NZC_DITH_NAC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_IMR_NZC_NDITH_NAC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_NIMR_ZC_DITH_NAC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_NIMR_ZC_NDITH_NAC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_NIMR_NZC_DITH_NAC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_NIMR_NZC_NDITH_NAC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);

INLINE int BLENDER2_16_IMR_ZC_DITH_NAC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_IMR_ZC_NDITH_NAC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_IMR_NZC_DITH_NAC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_IMR_NZC_NDITH_NAC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_NIMR_ZC_DITH_NAC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_NIMR_ZC_NDITH_NAC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_NIMR_NZC_DITH_NAC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_NIMR_NZC_NDITH_NAC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);

INLINE int BLENDER1_16_IMR_ZC_DITH_AC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_IMR_ZC_NDITH_AC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_IMR_NZC_DITH_AC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_IMR_NZC_NDITH_AC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_NIMR_ZC_DITH_AC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_NIMR_ZC_NDITH_AC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_NIMR_NZC_DITH_AC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);
INLINE int BLENDER1_16_NIMR_NZC_NDITH_AC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c, int dith);

INLINE int BLENDER2_16_IMR_ZC_DITH_AC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_IMR_ZC_NDITH_AC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_IMR_NZC_DITH_AC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_IMR_NZC_NDITH_AC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_NIMR_ZC_DITH_AC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_NIMR_ZC_NDITH_AC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_NIMR_NZC_DITH_AC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);
INLINE int BLENDER2_16_NIMR_NZC_NDITH_AC_NFORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2, int dith);

INLINE int BLENDER1_16_IMR_ZC_NAC_ND_NFORCE(UINT16 *fb, UINT8* hb, COLOR c);
INLINE int BLENDER1_16_IMR_NZC_NAC_ND_NFORCE(UINT16 *fb, UINT8* hb, COLOR c);
INLINE int BLENDER1_16_NIMR_ZC_NAC_ND_NFORCE(UINT16 *fb, UINT8* hb, COLOR c);
INLINE int BLENDER1_16_NIMR_NZC_NAC_ND_NFORCE(UINT16 *fb, UINT8* hb, COLOR c);

INLINE int BLENDER2_16_IMR_ZC_NAC_ND_NFORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2);
INLINE int BLENDER2_16_IMR_NZC_NAC_ND_NFORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2);
INLINE int BLENDER2_16_NIMR_ZC_NAC_ND_NFORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2);
INLINE int BLENDER2_16_NIMR_NZC_NAC_ND_NFORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2);

INLINE int BLENDER1_16_IMR_ZC_AC_ND_NFORCE(UINT16 *fb, UINT8* hb, COLOR c);
INLINE int BLENDER1_16_IMR_NZC_AC_ND_NFORCE(UINT16 *fb, UINT8* hb, COLOR c);
INLINE int BLENDER1_16_NIMR_ZC_AC_ND_NFORCE(UINT16 *fb, UINT8* hb, COLOR c);
INLINE int BLENDER1_16_NIMR_NZC_AC_ND_NFORCE(UINT16 *fb, UINT8* hb, COLOR c);

INLINE int BLENDER2_16_IMR_ZC_AC_ND_NFORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2);
INLINE int BLENDER2_16_IMR_NZC_AC_ND_NFORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2);
INLINE int BLENDER2_16_NIMR_ZC_AC_ND_NFORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2);
INLINE int BLENDER2_16_NIMR_NZC_AC_ND_NFORCE(UINT16 *fb, UINT8* hb, COLOR c1, COLOR c2);

static int (*rdp_blender1_16_dith_func[32])(UINT16 *, UINT8 *, COLOR, int) =
{
	BLENDER1_16_NIMR_NZC_NDITH_NAC_NFORCE,	BLENDER1_16_NIMR_NZC_NDITH_AC_NFORCE,	BLENDER1_16_NIMR_NZC_DITH_NAC_NFORCE,	BLENDER1_16_NIMR_NZC_DITH_AC_NFORCE,
	BLENDER1_16_NIMR_ZC_NDITH_NAC_NFORCE,	BLENDER1_16_NIMR_ZC_NDITH_AC_NFORCE,	BLENDER1_16_NIMR_ZC_DITH_NAC_NFORCE,	BLENDER1_16_NIMR_ZC_DITH_AC_NFORCE,
	BLENDER1_16_IMR_NZC_NDITH_NAC_NFORCE,	BLENDER1_16_IMR_NZC_NDITH_AC_NFORCE,	BLENDER1_16_IMR_NZC_DITH_NAC_NFORCE,	BLENDER1_16_IMR_NZC_DITH_AC_NFORCE,
	BLENDER1_16_IMR_ZC_NDITH_NAC_NFORCE,	BLENDER1_16_IMR_ZC_NDITH_AC_NFORCE, 	BLENDER1_16_IMR_ZC_DITH_NAC_NFORCE,		BLENDER1_16_IMR_ZC_DITH_AC_NFORCE,
	BLENDER1_16_NIMR_NZC_NDITH_NAC_FORCE,	BLENDER1_16_NIMR_NZC_NDITH_AC_FORCE,	BLENDER1_16_NIMR_NZC_DITH_NAC_FORCE,	BLENDER1_16_NIMR_NZC_DITH_AC_FORCE,
	BLENDER1_16_NIMR_ZC_NDITH_NAC_FORCE,	BLENDER1_16_NIMR_ZC_NDITH_AC_FORCE, 	BLENDER1_16_NIMR_ZC_DITH_NAC_FORCE,		BLENDER1_16_NIMR_ZC_DITH_AC_FORCE,
	BLENDER1_16_IMR_NZC_NDITH_NAC_FORCE,	BLENDER1_16_IMR_NZC_NDITH_AC_FORCE, 	BLENDER1_16_IMR_NZC_DITH_NAC_FORCE,		BLENDER1_16_IMR_NZC_DITH_AC_FORCE,
	BLENDER1_16_IMR_ZC_NDITH_NAC_FORCE, 	BLENDER1_16_IMR_ZC_NDITH_AC_FORCE,		BLENDER1_16_IMR_ZC_DITH_NAC_FORCE,		BLENDER1_16_IMR_ZC_DITH_AC_FORCE,
};

static int (*rdp_blender2_16_dith_func[32])(UINT16 *, UINT8 *, COLOR, COLOR, int) =
{
	BLENDER2_16_NIMR_NZC_NDITH_NAC_NFORCE,	BLENDER2_16_NIMR_NZC_NDITH_AC_NFORCE,	BLENDER2_16_NIMR_NZC_DITH_NAC_NFORCE,	BLENDER2_16_NIMR_NZC_DITH_AC_NFORCE,
	BLENDER2_16_NIMR_ZC_NDITH_NAC_NFORCE,	BLENDER2_16_NIMR_ZC_NDITH_AC_NFORCE,	BLENDER2_16_NIMR_ZC_DITH_NAC_NFORCE,	BLENDER2_16_NIMR_ZC_DITH_AC_NFORCE,
	BLENDER2_16_IMR_NZC_NDITH_NAC_NFORCE,	BLENDER2_16_IMR_NZC_NDITH_AC_NFORCE,	BLENDER2_16_IMR_NZC_DITH_NAC_NFORCE,	BLENDER2_16_IMR_NZC_DITH_AC_NFORCE,
	BLENDER2_16_IMR_ZC_NDITH_NAC_NFORCE,	BLENDER2_16_IMR_ZC_NDITH_AC_NFORCE, 	BLENDER2_16_IMR_ZC_DITH_NAC_NFORCE,		BLENDER2_16_IMR_ZC_DITH_AC_NFORCE,
	BLENDER2_16_NIMR_NZC_NDITH_NAC_FORCE,	BLENDER2_16_NIMR_NZC_NDITH_AC_FORCE,	BLENDER2_16_NIMR_NZC_DITH_NAC_FORCE,	BLENDER2_16_NIMR_NZC_DITH_AC_FORCE,
	BLENDER2_16_NIMR_ZC_NDITH_NAC_FORCE,	BLENDER2_16_NIMR_ZC_NDITH_AC_FORCE, 	BLENDER2_16_NIMR_ZC_DITH_NAC_FORCE,		BLENDER2_16_NIMR_ZC_DITH_AC_FORCE,
	BLENDER2_16_IMR_NZC_NDITH_NAC_FORCE,	BLENDER2_16_IMR_NZC_NDITH_AC_FORCE, 	BLENDER2_16_IMR_NZC_DITH_NAC_FORCE,		BLENDER2_16_IMR_NZC_DITH_AC_FORCE,
	BLENDER2_16_IMR_ZC_NDITH_NAC_FORCE, 	BLENDER2_16_IMR_ZC_NDITH_AC_FORCE,		BLENDER2_16_IMR_ZC_DITH_NAC_FORCE,		BLENDER2_16_IMR_ZC_DITH_AC_FORCE,
};

static int (*rdp_blender1_16_ndith_func[16])(UINT16 *, UINT8 *, COLOR) =
{
	BLENDER1_16_NIMR_NZC_NAC_ND_NFORCE,	BLENDER1_16_NIMR_NZC_AC_ND_NFORCE,
	BLENDER1_16_NIMR_ZC_NAC_ND_NFORCE,	BLENDER1_16_NIMR_ZC_AC_ND_NFORCE,
	BLENDER1_16_IMR_NZC_NAC_ND_NFORCE,	BLENDER1_16_IMR_NZC_AC_ND_NFORCE,
	BLENDER1_16_IMR_ZC_NAC_ND_NFORCE,	BLENDER1_16_IMR_ZC_AC_ND_NFORCE,
	BLENDER1_16_NIMR_NZC_NAC_ND_FORCE,	BLENDER1_16_NIMR_NZC_AC_ND_FORCE,
	BLENDER1_16_NIMR_ZC_NAC_ND_FORCE,	BLENDER1_16_NIMR_ZC_AC_ND_FORCE,
	BLENDER1_16_IMR_NZC_NAC_ND_FORCE,	BLENDER1_16_IMR_NZC_AC_ND_FORCE,
	BLENDER1_16_IMR_ZC_NAC_ND_FORCE,	BLENDER1_16_IMR_ZC_AC_ND_FORCE,
};

static int (*rdp_blender2_16_ndith_func[16])(UINT16 *, UINT8 *, COLOR, COLOR) =
{
	BLENDER2_16_NIMR_NZC_NAC_ND_NFORCE,	BLENDER2_16_NIMR_NZC_AC_ND_NFORCE,
	BLENDER2_16_NIMR_ZC_NAC_ND_NFORCE,	BLENDER2_16_NIMR_ZC_AC_ND_NFORCE,
	BLENDER2_16_IMR_NZC_NAC_ND_NFORCE,	BLENDER2_16_IMR_NZC_AC_ND_NFORCE,
	BLENDER2_16_IMR_ZC_NAC_ND_NFORCE,	BLENDER2_16_IMR_ZC_AC_ND_NFORCE,
	BLENDER2_16_NIMR_NZC_NAC_ND_FORCE,	BLENDER2_16_NIMR_NZC_AC_ND_FORCE,
	BLENDER2_16_NIMR_ZC_NAC_ND_FORCE,	BLENDER2_16_NIMR_ZC_AC_ND_FORCE,
	BLENDER2_16_IMR_NZC_NAC_ND_FORCE,	BLENDER2_16_IMR_NZC_AC_ND_FORCE,
	BLENDER2_16_IMR_ZC_NAC_ND_FORCE,	BLENDER2_16_IMR_ZC_AC_ND_FORCE,
};
